<?php

namespace App\Service\Push;

use Illuminate\Support\Str;

/**
 * 推送，基础任务的sql获取 - mock
 */
class PushMockFuncService extends PushAbstractFuncService
{
    private function base(array $userIds)
    {
        return collect($userIds)->map(function ($item) {
            $userId    = $item;
            $createdAt = strtotime('20220901') + rand(1,50) * 86400;
            $uuid      = Str::uuid();

            return $this->taskResponse($userId, $createdAt, $uuid);
        })->toArray();
    }

    // 加盟费待支付
    public function task101(): array
    {
        return $this->base([6,6,6, 16]);
    }

    // 加盟费待签约
    public function task102(): array
    {
        return $this->base([6,1]);
    }

    // 选址待提交
    public function task141(): array
    {
        return $this->base([6,1]);
    }

    // 商家待确认
    public function task144(): array
    {
        return $this->base([6,1]);
    }

    // 三方稽核 - 待提交
    public function task162(): array
    {
        return $this->base([6,1]);
    }

    // 三方稽核 - 待修改
    public function task163(): array
    {
        return $this->base([6,6]);
    }

    // 商学院待确认
    public function task171(): array
    {
        return $this->base([6,1]);
    }

    // 商家待确认
    public function task172(): array
    {
        return $this->base([6,1]);
    }
}
